package com.gang.mars.basic.annotation;

import java.lang.annotation.Annotation;

/**
 * @author gang.chen
 * @Date 2022/8/17 12:57
 */

@MySpringBootApplication
public class HelloWorldApplication {

    public static void main(String[] args) {
        try {
            Class<?> aClass = Class.forName(HelloWorldApplication.class.getName());

            Annotation[] declaredAnnotations = aClass.getDeclaredAnnotations();

            for (Annotation declaredAnnotation : declaredAnnotations) {

                Class<? extends Annotation> aClass1 = declaredAnnotation.annotationType();
                System.out.println(declaredAnnotation);
            }
        }
        catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
}
